<template>
  <div class="hello">
    <ul class="navList">
      <li v-for="(item,index) in nav" :key="index">
        <img :src="require(`../../../assets/image/${img[index]}`)" alt="">
        <span>{{item}}</span>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      nav: [
        "酒店","机票","火车票","度假","景点门票","海外酒店","低价机票","汽车票船票","自由行","攻略","民宿客栈","专车自驾","赚钱-信用卡","旅游团购","一日游","特惠酒店","借钱","白金卡","行程设计","周末游"
      ],
      img: ["logo1.png", "flight.png","train.png", "package.png","piao.png", "out.png","lowPrice.png", "card.png","ziyou.png", "gonglue.png","minsu.png", "logo1.png","logo1.png","logo1.png","logo1.png","logo1.png","logo1.png","logo1.png","logo1.png","logo1.png"]
    }
  },
  name: 'NavBar',
  props: {
    msg: String
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .navList {
    display: flex;
    padding: 0;
    flex-flow: row wrap;
    justify-content: space-evenly;
  }
  .navList li {
    width: 20%;
    display: flex;
    align-items: center;
    flex-direction: column;
    margin-bottom: 10px;
  }
  .navList li img {
     width: 70%;
  }
  .navList li span {
    font-size: 14px;
  }
</style>
